package com.kczd.jinlan.adapter;

import android.content.Context;
import android.widget.TextView;

import com.kczd.jinlan.R;
import com.kczd.jinlan.adapter.normaladapter.BaseCommAdapter;
import com.kczd.jinlan.adapter.normaladapter.ViewHolder;
import com.kczd.jinlan.model.User;

import java.util.List;

/**
 * yang_g
 * 地址
 * Created by Administrator on 2017/5/24.
 */

public class LocationAdapter extends BaseCommAdapter<User> {
    public LocationAdapter(List<User> datas) {
        super(datas);
    }

    @Override
    protected void setUI(ViewHolder holder, int position, Context context) {
        User user = getItem(position);

        TextView text_location_name = holder.getItemView(R.id.text_location_name);
        text_location_name.setText(user.getUsername());

        TextView text_number = holder.getItemView(R.id.text_number);
        text_number.setText(user.getMobile());

        TextView text_address = holder.getItemView(R.id.text_address);
        text_address.setText(user.getAddress());
    }

    @Override
    protected int getLayoutId() {
        return R.layout.item_list_location;
    }
}
